<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Api extends My_Controller {

	function __construct(){
		parent::__construct();
	}
	//t添加建议
	function suggest_add(){
		$data=$this->input->post();
		if($data){
			$data['add_time']=time();
			$this->db->insert('suggest',$data);
			$id=$this->db->insert_id();
			if($id){
				echo '{"status":true,"msg":"建议提交成功，谢谢您的支持"}';	
			}else{
				echo '{"status":false,"msg":"建议提交失败，谢谢您的支持，请稍后重试"}';	
			}
		}
	}

}